#include <cmath>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <vector>
#include <string>
#include <memory>
#include <utility>
#include <iostream>
#include <type_traits>
#include <bits/stdc++.h>

namespace scd
{
    using std::cin, std::cout, std::string, std::vector, std::unique_ptr;
    using std::declval, std::getchar, std::putchar, std::move, std::forward, std::swap, std::endl, std::make_unique;
    using std::is_floating_point, std::is_integral, std::is_reference, std::is_same, std::true_type, std::false_type, std::decay_t, std::enable_if_t, std::size_t;

    template <typename...>
    using void_t = void;

    template <typename T>
    using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;

    template <typename, typename = void>
    struct has_read : false_type
    {
    };

    template <typename T>
    struct has_read<T, void_t<decltype(declval<T &>().read())>> : true_type
    {
    };

    template <typename T>
    inline constexpr bool has_read_v = has_read<T>::value;

    template <typename, typename = void>
    struct has_print : false_type
    {
    };

    template <typename T>
    struct has_print<T, void_t<decltype(declval<T>().print())>> : true_type
    {
    };

    template <typename T>
    inline constexpr bool has_print_v = has_print<T>::value;

    template <typename, typename = void>
    struct is_callable : false_type
    {
    };

    template <typename T>
    struct is_callable<T, void_t<decltype(declval<T>()())>> : true_type
    {
    };

    template <typename T>
    inline constexpr bool is_callable_v = is_callable<T>::value;

    template <typename Raw = int, typename T = decay_t<Raw>>
    inline auto read() -> enable_if_t<is_integral<T>::value, T>
    {
        T x = 0;
        bool fl = false;
        char c = getchar();
        while (c < '0' || c > '9')
            fl |= (c == '-'), c = getchar();
        while (c >= '0' && c <= '9')
        {
            x = (x << 3) + (x << 1) + (c ^ 48);
            c = getchar();
        }
        return fl ? -x : x;
    }

    template <typename Raw, typename T = decay_t<Raw>>
    inline auto read() -> enable_if_t<!is_integral<T>::value, T>
    {
        T x;
        cin >> x;
        return x;
    }

    template <typename Raw, typename T = decay_t<Raw>>
    inline auto read(Raw &&x) -> enable_if_t<is_integral<T>::value>
    {
        x = 0;
        bool fl = false;
        char c = getchar();
        while (c < '0' || c > '9')
            fl |= (c == '-'), c = getchar();
        while (c >= '0' && c <= '9')
        {
            x = (x << 3) + (x << 1) + (c ^ 48);
            c = getchar();
        }
    }

    inline void read(char *p)
    {
        char c = getchar();
        while (isspace(c))
            c = getchar();
        while (c != EOF && !isspace(c))
        {
            *p++ = c;
            c = getchar();
        }
        *p = '\0';
    }

    template <typename T>
    inline auto read(T &&x) -> enable_if_t<has_read_v<T>>
    {
        x.read();
    }

    template <typename T>
    inline auto read(T &&x) -> enable_if_t<!is_integral<decay_t<T>>::value &&
                                           !has_read_v<T>>
    {
        cin >> x;
    }

    template <typename... T>
    inline void read(T &&...x)
    {
        (read(forward<T>(x)), ...);
    }

    template <typename Raw = int, typename T = decay_t<Raw>>
    inline auto print(Raw x) -> enable_if_t<is_integral<T>::value>
    {
        if (x < 0)
        {
            putchar('-');
            x = -x;
        }
        if (x > 9)
            print(x / 10);
        putchar(x % 10 + '0');
    }

    template <int d = 6, typename Raw = double, typename T = decay_t<Raw>>
    inline auto print(Raw x) -> enable_if_t<is_floating_point<T>::value>
    {
        printf("%.*f", d, x);
    }

    inline void print(char x)
    {
        putchar(x);
    }

    inline void print(const char *x)
    {
        while (*x)
            putchar(*x++);
    }

    template <typename T>
    inline auto print(T &&x) -> enable_if_t<has_print_v<T>>
    {
        x.print();
    }

    template <typename Raw, typename T = decay_t<Raw>>
    inline auto print(Raw &&x)
        -> enable_if_t<!is_integral<T>::value &&
                       !is_floating_point<T>::value &&
                       !has_print<Raw>::value>
    {
        cout << x;
    }

    template <typename... T>
    inline void print(T &&...x)
    {
        (print(forward<T>(x)), ...);
    }

    template <typename... T>
    inline void printws(T &&...x)
    {
        (print(forward<T>(x), ' '), ...);
    }

    template <typename... T>
    inline void println(T &&...x)
    {
        printws(x...);
        print('\n');
    }

    template <typename T = int>
    class Vec : public vector<T>
    {
    public:
        using vector<T>::vector;

        void read() noexcept
        {
            for (auto &item : *this)
                scd::read(item);
        }

        void print() const noexcept
        {
            for (const auto &item : *this)
                scd::printws(item);
        }
    };

    class Str : public string
    {
    public:
        using string::string;

        Str(const string &s) noexcept : string(s) {}

        Str(string &&s) noexcept : string(move(s)) {}

        Str(const char *s) noexcept : string(s) {}

        void read() noexcept { cin >> *this; }

        void print() const noexcept { scd::print(c_str()); }
    };

    // todo! IDIOM copy and swap
    class CowStr
    {
    private:
        Str *s;
        unsigned *cnt;

        void release() noexcept
        {
            if (--*cnt == 0)
            {
                delete s;
                delete cnt;
            }
        }

    public:
        CowStr() noexcept : s(new Str()), cnt(new unsigned(1)) {}

        CowStr(const CowStr &c) noexcept : s(c.s), cnt(c.cnt) { ++*cnt; }

        CowStr(CowStr &&c) noexcept : s(c.s), cnt(c.cnt)
        {
            c.s = nullptr;
            c.cnt = nullptr;
        }

        explicit CowStr(const Str &str) noexcept : s(new Str(str)), cnt(new unsigned(1)) {}
        explicit CowStr(Str &&str) noexcept : s(new Str(move(str))), cnt(new unsigned(1)) {}
        explicit CowStr(const string &str) noexcept : s(new Str(str)), cnt(new unsigned(1)) {}
        explicit CowStr(string &&str) noexcept : s(new Str(move(str))), cnt(new unsigned(1)) {}
        explicit CowStr(const char *str) noexcept : s(new Str(str)), cnt(new unsigned(1)) {}

        CowStr &operator=(CowStr other) noexcept
        {
            swap(*this, other);
            return *this;
        }

        friend void swap(CowStr &a, CowStr &b) noexcept
        {
            swap(a.s, b.s);
            swap(a.cnt, b.cnt);
        }

        ~CowStr() noexcept
        {
            if (cnt)
                release();
        }

        auto &operator[](int i) noexcept { return (*s)[i]; }
        void read() noexcept { s->read(); }
        void print() const noexcept { s->print(); }
    };

    namespace exports
    {
        using scd::print, scd::println, scd::printws, scd::read;
        using scd::Vec, scd::Str, scd::CowStr;
    }
}

using namespace scd::exports;

using namespace std;

namespace STD
{
    constexpr int N = 1e5 + 5, M = N << 1;
    int n, m, k, vis[N];
    int ned[N], fa[N];
    vector<int> g[N];
    Vec<Vec<>> res;
    int dfs(int u)
    {
        vis[u] = 1;
        int lst = -1;
        if (ned[u] && 0)
        {
            for (auto v : g[u])
            {
                if (vis[v])
                    continue;
                fa[v] = u;
                int w = dfs(v);
                if (w != -1)
                {
                    if (lst == -1)
                        lst = w;
                    else
                    {
                        Vec<> t;
                        int k = w;
                        while (k != u)
                        {
                            t.push_back(k);
                            k = fa[k];
                        }
                        t.push_back(u);
                        res.push_back(t);
                        lst = -1;
                    }
                }
            }
            return lst;
        }
        else
        {
            for (auto v : g[u])
            {
                if (vis[v])
                    continue;
                fa[v] = u;
                int w = dfs(v);
                if (w != -1)
                {
                    if (lst == -1)
                        lst = w;
                    else
                    {
                        Vec<> t;
                        int k = w;
                        while (k != u)
                        {
                            t.push_back(k);
                            k = fa[k];
                        }
                        t.push_back(u);
                        vector<int> t2;
                        k = lst;
                        while (k != u)
                        {
                            t2.push_back(k);
                            k = fa[k];
                        }
                        reverse(begin(t2), end(t2));
                        for (auto k : t2)
                            t.push_back(k);
                        res.push_back(t);
                        lst = -1;
                    }
                }
            }
            if (ned[u])
            {
                if (lst == -1)
                    return u;
                else
                {
                    Vec<> t;
                    int k = lst;
                    while (k != u)
                    {
                        t.push_back(k);
                        k = fa[k];
                    }
                    t.push_back(u);
                    res.push_back(t);
                    return -1;
                }
            }
            return lst;
        }
    }
    void main()
    {
        read(n, m, k);
        for (int i = 1; i <= m; ++i)
        {
            int u = read(), v = read();
            g[u].push_back(v);
            g[v].push_back(u);
        }
        for (int i = 1; i <= k; ++i)
            ned[read()] = 1;
        for (int i = 1; i <= n; ++i)
        {
            if (!vis[i])
            {
                fa[i] = -1;
                dfs(i);
            }
        }
        println(res.size());
        for (const auto &p : res)
            println(p.size(), p);
    }
}

int main(int argc, const char **argv)
{
    freopen("travel.in", "r", stdin);
    freopen("travel.out", "w", stdout);
    STD::main();
    return 0;
}
